#ifndef __APP_FLIGHT_H__
#define __APP_FLIGHT_H__
#include "Int_Motor.h"
#include "FreeRTOS.h"
#include "task.h"
#include "Int_MPU6050.h"
#include "Com_Filter.h"
#include "Com_IMU.h"
#include "Com_PID.h"

#define LIMIT(x,min,max) ((x)<(min)?(min):((x)>(max)?(max):(x)))

void App_Flight_SetMotorSpeed(Remote_Struct *remote_data, Flight_Status flight_status);

void App_Flight_ReadAccelGyro(AccelGyro_Struct *accel_gyro);

void App_Flight_GetEulerAngle(AccelGyro_Struct *accel_gyro, EulerAngle_Struct *eulerAngle, float dt);

void App_Flight_EulerAnglePID(Remote_Struct *remote_data, EulerAngle_Struct *euler_angle, AccelGyro_Struct *accel_gyro, float dt);

void App_Filght_PID(uint16_t height, uint16_t fix_height, float dt);

#endif /* __APP_FLIGHT_H__ */